<template>
    <router-view />
</template>

<script setup>
import { useRouter } from "vue-router";
import { onMounted } from "vue";
import { GetStorage } from "./utils";

const router = useRouter();

onMounted(() => {
    const user = GetStorage("user");
    if (!user) {
        router.replace("/login");
    }
});
</script>

<style lang="scss" scoped></style>
